/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.bcps;

import cn.ac.iie.di.tools.FileTools;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

/**
 *
 * @author Austin
 */
public class test {

    private static boolean deleteDir(File dir) {
        if (dir.isDirectory()) {
            String[] children = dir.list();
            //递归删除目录中的子目录下
            for (int i = 0; i < children.length; i++) {
//                boolean success = deleteDir(new File(dir, children[i]));
                boolean success = new File(dir, children[i]).delete();
                if (!success) {
                    return false;
                }
            }
        }
        // 目录此时为空，可以删除
        return dir.delete();
    }

    public static void main(String[] args) {
        JSONObject j = JSONObject.fromObject("{\"g_id\":\"fda80d0e489a061eaf265d25063d0296\",\"sendtime\":1507314655,\"table\":\"tp_wxq_target_v1\",\"m_ch_id\":\"1507313352\",\"u_ch_id\":\"2413173381\",\"m_chat_room\":\"8193449967\"} }");
        System.out.println(j.getLong("m_ch_id"));
    }
}
